package com.briup.enums;

public enum  CodeAndMessageEnum {
    SUCCESS(200,"操作成功"),

    ERROR(500,"系统异常"),
    QRCODE_GENERATE_ERROR(5001,"二维码生成异常"),
    USERNAME_OR_PASSWORD_IS_NOT_NULL(1001,"用户名和密码不能为空"),
    USERNMAE_OR_PASSWORD_IS_ERROR(10002,"用户名或密码错误"),
    /* 用户错误：20001-29999*/
    USER_NOT_LOGIN(20001, "用户未登录"),
    USER_LOGIN_ERROR(20002, "账号密码错误"),
    USER_ACCOUNT_FORBIDDEN(20003, "账号已被禁用"),
    USER_NOT_EXIST(20004, "用户不存在"),
    USER_HAS_EXISTED(20005, "用户已存在"),
    TOKEN_EXPIRED(20006, "身份信息已过期请重新登录"),
    TOKEN_INVALID(20007, "身份认证信息无效"),
    USER_IS_BAN(20008,"用户已封禁"),
    /**
     * 判空问题 30000-31000
     */
    PAGE_NUMBER_OR_PAGE_SIZE_IS_NULL(30000,"页码或页面大小为空"),
    FENCE_HOUSE_NAME_IS_NULL(30001,"栏舍名字为空"),
    QUARANTINE_REGISTRATION_NAME_IS_NULL(30002,"检疫机构名字为空"),
    ANIMAL_ID_IS_NULL(30003,"动物id为空"),

    /**
     * 对象为空问题 31000-32000
     */
    FENCE_HOUSE_IS_NULL(31000,"栏舍不存在"),
    QUARANTINE_REGISTRATION_IS_NULL(31002,"检疫记录不存在"),
    INDEX_RECORD_IS_NULL(31003,"指标记录不存在"),
    ANIMAL_INFO_IS_NOT_EXIST(31004,"动物信息不存在"),
    ANIMAL_ID_IS_EXIST(31005,"动物id无效"),
    DISEASE_RECORD_IS_NULL(31006,"病症为空"),

    /**
     * 其他问题 50000-59999
     */
    UPLOAD_ERROR(50000,"文件上传失败"),
    HURDLES_IS_FULL(50002,"栏圈已满");
    ;
    private Integer code;
    private String message;

    CodeAndMessageEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
